import {tableOptBtnConfig} from "../table";

export default {
  "tableId": "generalCommand",
  "name": "通用命令",
  "columns": [
    {
      label: '协议名称',
      width: 160,
      children: [
        {
          key: 'protocolName',
        },
      ],
    },
    {
      label: '设备类别',
      width: 140,
      children: [
        {
          key: 'deviceTypeName',
        },
      ]
    },

    {
      label: '命令详情',
      width: 180,
      children: [
        {
          key: 'methodName',
          tooltip: true
        }
      ],
    },
    {
      label: '备注',
      width: 100,
      children: [
        {
          key: 'remarks',
          tooltip: true
        }
      ],
    },
    {
      label: '更新时间',
      width: 100,
      children: [
        {
          updatedDate: true
        }
      ],
    },
    {
      "label": "操作",
      "operation": true,
      "width": 220,
      "children": [
        {
          "button": true,
          type: tableOptBtnConfig.command.type,
        }, {
          "button": true,
          type: tableOptBtnConfig.widgetList.type,
        },
        {
          'dropdown': true,
          'options': [
            {
              'type': 'edit',
              'class': 'hover-font-danger'
            },
            {
              'type': 'delete',
              'class': 'hover-font-danger'
            }
          ]
        }
      ]
    }
  ],
  "filters": [
    {
      "fieldType": "string",
      key: 'deviceType',
      label: '设备类别',
      "dataApi": API.deviceType.deviceTypeAll,
      "options": []
    },

    {
      "fieldType": "input",
      key: 'protocolName',
      label: '协议名称',
    },

  ]
}
